<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class UsersFriendsApplication extends  Model
{

    const result1 = '待处理';
    const result2 = '通过';
    const result3 = '拒绝';

    use HasFactory;
    use SoftDeletes;

    protected $table = 'users_friends_application';

    static $unguarded = true;

    public  function friends(): \Illuminate\Database\Eloquent\Relations\HasOne
    {

        return $this->hasOne(Users::class,'id','friends_id');
    }

    public  function initiateFriends(): \Illuminate\Database\Eloquent\Relations\HasOne
    {

        return $this->hasOne(Users::class,'id','user_id');
    }

}
